home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / Lists.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  8.4 KB  |  452 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Lists.a
  3. ;
  4. ;    Contains:    List Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__LISTS__') = 'UNDEFINED' THEN
  21. __LISTS__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  30.     include 'Controls.a'
  31.     ENDIF
  32. ;        include 'Quickdraw.a'                                        ;
  33. ;            include 'MixedMode.a'                                    ;
  34. ;            include 'QuickdrawText.a'                                ;
  35. ;        include 'Menus.a'                                            ;
  36. ;            include 'Memory.a'                                        ;
  37.  
  38.     IF &TYPE('__MEMORY__') = 'UNDEFINED' THEN
  39.     include 'Memory.a'
  40.     ENDIF
  41.     IF &TYPE('STRICT_LISTS') = 'UNDEFINED' THEN
  42.     STRICT_LISTS: SET 0
  43.     ENDIF
  44.     IF ¬ STRICT_LISTS  THEN
  45.  
  46. lDoVAutoscroll                    EQU        2
  47. lDoHAutoscroll                    EQU        1
  48. lOnlyOne                        EQU        -128
  49. lExtendDrag                        EQU        64
  50. lNoDisjoint                        EQU        32
  51. lNoExtend                        EQU        16
  52. lNoRect                            EQU        8
  53. lUseSense                        EQU        4
  54. lNoNilHilite                    EQU        2
  55.  
  56. lDoVAutoscrollBit                EQU        1
  57. lDoHAutoscrollBit                EQU        0
  58. lOnlyOneBit                        EQU        7
  59. lExtendDragBit                    EQU        6
  60. lNoDisjointBit                    EQU        5
  61. lNoExtendBit                    EQU        4
  62. lNoRectBit                        EQU        3
  63. lUseSenseBit                    EQU        2
  64. lNoNilHiliteBit                    EQU        1
  65.  
  66.     ENDIF
  67.  
  68. lInitMsg                        EQU        0
  69. lDrawMsg                        EQU        1
  70. lHiliteMsg                        EQU        2
  71. lCloseMsg                        EQU        3
  72.  
  73.     IF STRICT_LISTS  THEN
  74. ; typedef ListRef             ListHandle
  75.     ELSE
  76. ; typedef struct ListRec     ListRec, *ListPtr, **ListHandle
  77. ; typedef ListHandle         ListRef
  78.     ENDIF
  79. ; typedef Point             Cell
  80. ; typedef Rect                 ListBounds
  81. ; typedef char                 DataArray[32001]
  82.     IF ¬ STRICT_LISTS  THEN
  83. ListRec                 RECORD    0
  84. rView                     ds     Rect    ; offset: $0 (0)
  85. port                     ds.l   1        ; offset: $8 (8)
  86. indent                     ds     Point    ; offset: $C (12)
  87. cellSize                 ds     Point    ; offset: $10 (16)
  88. visible                     ds.l   2        ; offset: $14 (20)
  89. vScroll                     ds.l   1        ; offset: $1C (28)
  90. hScroll                     ds.l   1        ; offset: $20 (32)
  91. selFlags                 ds.b   1        ; offset: $24 (36)
  92. lActive                     ds.b   1        ; offset: $25 (37)
  93. lReserved                 ds.b   1        ; offset: $26 (38)
  94. listFlags                 ds.b   1        ; offset: $27 (39)
  95. clikTime                 ds.l   1        ; offset: $28 (40)
  96. clikLoc                     ds     Point    ; offset: $2C (44)
  97. mouseLoc                 ds     Point    ; offset: $30 (48)
  98. lClickLoop                 ds.l   1        ; offset: $34 (52)
  99. lastClick                 ds.l   1        ; offset: $38 (56)
  100. refCon                     ds.l   1        ; offset: $3C (60)
  101. listDefProc                 ds.l   1        ; offset: $40 (64)
  102. userHandle                 ds.l   1        ; offset: $44 (68)
  103. dataBounds                 ds.l   2        ; offset: $48 (72)
  104. cells                     ds.l   1        ; offset: $50 (80)
  105. maxIndex                 ds.w   1        ; offset: $54 (84)
  106. cellArray                 ds.w   1        ; offset: $56 (86)
  107. sizeof                     EQU *            ; size:   $58 (88)
  108.                         ENDR
  109.  
  110.     ENDIF
  111. ;
  112. ; pascal ListRef LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowRef theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
  113. ;
  114.     IF ¬ GENERATINGCFM THEN
  115.         Macro
  116.         _LNew
  117.             move.w    #$0044,-(sp)
  118.             dc.w     $A9E7
  119.         EndM
  120.     ELSE
  121.         IMPORT_CFM_FUNCTION    LNew
  122.     ENDIF
  123.  
  124. ;
  125. ; pascal void LDispose(ListRef lHandle)
  126. ;
  127.     IF ¬ GENERATINGCFM THEN
  128.         Macro
  129.         _LDispose
  130.             move.w    #$0028,-(sp)
  131.             dc.w     $A9E7
  132.         EndM
  133.     ELSE
  134.         IMPORT_CFM_FUNCTION    LDispose
  135.     ENDIF
  136.  
  137. ;
  138. ; pascal short LAddColumn(short count, short colNum, ListRef lHandle)
  139. ;
  140.     IF ¬ GENERATINGCFM THEN
  141.         Macro
  142.         _LAddColumn
  143.             move.w    #$0004,-(sp)
  144.             dc.w     $A9E7
  145.         EndM
  146.     ELSE
  147.         IMPORT_CFM_FUNCTION    LAddColumn
  148.     ENDIF
  149.  
  150. ;
  151. ; pascal short LAddRow(short count, short rowNum, ListRef lHandle)
  152. ;
  153.     IF ¬ GENERATINGCFM THEN
  154.         Macro
  155.         _LAddRow
  156.             move.w    #$0008,-(sp)
  157.             dc.w     $A9E7
  158.         EndM
  159.     ELSE
  160.         IMPORT_CFM_FUNCTION    LAddRow
  161.     ENDIF
  162.  
  163. ;
  164. ; pascal void LDelColumn(short count, short colNum, ListRef lHandle)
  165. ;
  166.     IF ¬ GENERATINGCFM THEN
  167.         Macro
  168.         _LDelColumn
  169.             move.w    #$0020,-(sp)
  170.             dc.w     $A9E7
  171.         EndM
  172.     ELSE
  173.         IMPORT_CFM_FUNCTION    LDelColumn
  174.     ENDIF
  175.  
  176. ;
  177. ; pascal void LDelRow(short count, short rowNum, ListRef lHandle)
  178. ;
  179.     IF ¬ GENERATINGCFM THEN
  180.         Macro
  181.         _LDelRow
  182.             move.w    #$0024,-(sp)
  183.             dc.w     $A9E7
  184.         EndM
  185.     ELSE
  186.         IMPORT_CFM_FUNCTION    LDelRow
  187.     ENDIF
  188.  
  189. ;
  190. ; pascal Boolean LGetSelect(Boolean next, Cell *theCell, ListRef lHandle)
  191. ;
  192.     IF ¬ GENERATINGCFM THEN
  193.         Macro
  194.         _LGetSelect
  195.             move.w    #$003C,-(sp)
  196.             dc.w     $A9E7
  197.         EndM
  198.     ELSE
  199.         IMPORT_CFM_FUNCTION    LGetSelect
  200.     ENDIF
  201.  
  202. ;
  203. ; pascal Cell LLastClick(ListRef lHandle)
  204. ;
  205.     IF ¬ GENERATINGCFM THEN
  206.         Macro
  207.         _LLastClick
  208.             move.w    #$0040,-(sp)
  209.             dc.w     $A9E7
  210.         EndM
  211.     ELSE
  212.         IMPORT_CFM_FUNCTION    LLastClick
  213.     ENDIF
  214.  
  215. ;
  216. ; pascal Boolean LNextCell(Boolean hNext, Boolean vNext, Cell *theCell, ListRef lHandle)
  217. ;
  218.     IF ¬ GENERATINGCFM THEN
  219.         Macro
  220.         _LNextCell
  221.             move.w    #$0048,-(sp)
  222.             dc.w     $A9E7
  223.         EndM
  224.     ELSE
  225.         IMPORT_CFM_FUNCTION    LNextCell
  226.     ENDIF
  227.  
  228. ;
  229. ; pascal Boolean LSearch(const void *dataPtr, short dataLen, ListSearchUPP searchProc, Cell *theCell, ListRef lHandle)
  230. ;
  231.     IF ¬ GENERATINGCFM THEN
  232.         Macro
  233.         _LSearch
  234.             move.w    #$0054,-(sp)
  235.             dc.w     $A9E7
  236.         EndM
  237.     ELSE
  238.         IMPORT_CFM_FUNCTION    LSearch
  239.     ENDIF
  240.  
  241. ;
  242. ; pascal void LSize(short listWidth, short listHeight, ListRef lHandle)
  243. ;
  244.     IF ¬ GENERATINGCFM THEN
  245.         Macro
  246.         _LSize
  247.             move.w    #$0060,-(sp)
  248.             dc.w     $A9E7
  249.         EndM
  250.     ELSE
  251.         IMPORT_CFM_FUNCTION    LSize
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal void LSetDrawingMode(Boolean drawIt, ListRef lHandle)
  256. ;
  257.     IF ¬ GENERATINGCFM THEN
  258.         Macro
  259.         _LSetDrawingMode
  260.             move.w    #$002C,-(sp)
  261.             dc.w     $A9E7
  262.         EndM
  263.     ELSE
  264.         IMPORT_CFM_FUNCTION    LSetDrawingMode
  265.     ENDIF
  266.  
  267. ;
  268. ; pascal void LScroll(short dCols, short dRows, ListRef lHandle)
  269. ;
  270.     IF ¬ GENERATINGCFM THEN
  271.         Macro
  272.         _LScroll
  273.             move.w    #$0050,-(sp)
  274.             dc.w     $A9E7
  275.         EndM
  276.     ELSE
  277.         IMPORT_CFM_FUNCTION    LScroll
  278.     ENDIF
  279.  
  280. ;
  281. ; pascal void LAutoScroll(ListRef lHandle)
  282. ;
  283.     IF ¬ GENERATINGCFM THEN
  284.         Macro
  285.         _LAutoScroll
  286.             move.w    #$0010,-(sp)
  287.             dc.w     $A9E7
  288.         EndM
  289.     ELSE
  290.         IMPORT_CFM_FUNCTION    LAutoScroll
  291.     ENDIF
  292.  
  293. ;
  294. ; pascal void LUpdate(RgnHandle theRgn, ListRef lHandle)
  295. ;
  296.     IF ¬ GENERATINGCFM THEN
  297.         Macro
  298.         _LUpdate
  299.             move.w    #$0064,-(sp)
  300.             dc.w     $A9E7
  301.         EndM
  302.     ELSE
  303.         IMPORT_CFM_FUNCTION    LUpdate
  304.     ENDIF
  305.  
  306. ;
  307. ; pascal void LActivate(Boolean act, ListRef lHandle)
  308. ;
  309.     IF ¬ GENERATINGCFM THEN
  310.         Macro
  311.         _LActivate
  312.             dc.w     $4267
  313.             dc.w     $A9E7
  314.         EndM
  315.     ELSE
  316.         IMPORT_CFM_FUNCTION    LActivate
  317.     ENDIF
  318.  
  319. ;
  320. ; pascal void LCellSize(Point cSize, ListRef lHandle)
  321. ;
  322.     IF ¬ GENERATINGCFM THEN
  323.         Macro
  324.         _LCellSize
  325.             move.w    #$0014,-(sp)
  326.             dc.w     $A9E7
  327.         EndM
  328.     ELSE
  329.         IMPORT_CFM_FUNCTION    LCellSize
  330.     ENDIF
  331.  
  332. ;
  333. ; pascal Boolean LClick(Point pt, short modifiers, ListRef lHandle)
  334. ;
  335.     IF ¬ GENERATINGCFM THEN
  336.         Macro
  337.         _LClick
  338.             move.w    #$0018,-(sp)
  339.             dc.w     $A9E7
  340.         EndM
  341.     ELSE
  342.         IMPORT_CFM_FUNCTION    LClick
  343.     ENDIF
  344.  
  345. ;
  346. ; pascal void LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListRef lHandle)
  347. ;
  348.     IF ¬ GENERATINGCFM THEN
  349.         Macro
  350.         _LAddToCell
  351.             move.w    #$000C,-(sp)
  352.             dc.w     $A9E7
  353.         EndM
  354.     ELSE
  355.         IMPORT_CFM_FUNCTION    LAddToCell
  356.     ENDIF
  357.  
  358. ;
  359. ; pascal void LClrCell(Cell theCell, ListRef lHandle)
  360. ;
  361.     IF ¬ GENERATINGCFM THEN
  362.         Macro
  363.         _LClrCell
  364.             move.w    #$001C,-(sp)
  365.             dc.w     $A9E7
  366.         EndM
  367.     ELSE
  368.         IMPORT_CFM_FUNCTION    LClrCell
  369.     ENDIF
  370.  
  371. ;
  372. ; pascal void LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListRef lHandle)
  373. ;
  374.     IF ¬ GENERATINGCFM THEN
  375.         Macro
  376.         _LGetCell
  377.             move.w    #$0038,-(sp)
  378.             dc.w     $A9E7
  379.         EndM
  380.     ELSE
  381.         IMPORT_CFM_FUNCTION    LGetCell
  382.     ENDIF
  383.  
  384. ;
  385. ; pascal void LRect(Rect *cellRect, Cell theCell, ListRef lHandle)
  386. ;
  387.     IF ¬ GENERATINGCFM THEN
  388.         Macro
  389.         _LRect
  390.             move.w    #$004C,-(sp)
  391.             dc.w     $A9E7
  392.         EndM
  393.     ELSE
  394.         IMPORT_CFM_FUNCTION    LRect
  395.     ENDIF
  396.  
  397. ;
  398. ; pascal void LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListRef lHandle)
  399. ;
  400.     IF ¬ GENERATINGCFM THEN
  401.         Macro
  402.         _LSetCell
  403.             move.w    #$0058,-(sp)
  404.             dc.w     $A9E7
  405.         EndM
  406.     ELSE
  407.         IMPORT_CFM_FUNCTION    LSetCell
  408.     ENDIF
  409.  
  410. ;
  411. ; pascal void LSetSelect(Boolean setIt, Cell theCell, ListRef lHandle)
  412. ;
  413.     IF ¬ GENERATINGCFM THEN
  414.         Macro
  415.         _LSetSelect
  416.             move.w    #$005C,-(sp)
  417.             dc.w     $A9E7
  418.         EndM
  419.     ELSE
  420.         IMPORT_CFM_FUNCTION    LSetSelect
  421.     ENDIF
  422.  
  423. ;
  424. ; pascal void LDraw(Cell theCell, ListRef lHandle)
  425. ;
  426.     IF ¬ GENERATINGCFM THEN
  427.         Macro
  428.         _LDraw
  429.             move.w    #$0030,-(sp)
  430.             dc.w     $A9E7
  431.         EndM
  432.     ELSE
  433.         IMPORT_CFM_FUNCTION    LDraw
  434.     ENDIF
  435.  
  436. ;
  437. ; pascal void LGetCellDataLocation(short *offset, short *len, Cell theCell, ListRef lHandle)
  438. ;
  439.     IF ¬ GENERATINGCFM THEN
  440.         Macro
  441.         _LGetCellDataLocation
  442.             move.w    #$0034,-(sp)
  443.             dc.w     $A9E7
  444.         EndM
  445.     ELSE
  446.         IMPORT_CFM_FUNCTION    LGetCellDataLocation
  447.     ENDIF
  448.  
  449.     IF OLDROUTINENAMES  THEN
  450.     ENDIF
  451.     ENDIF ; __LISTS__
  452.